#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.8.1
 Author:         myName

 Script Function:
	Template AutoIt script.

#ce ----------------------------------------------------------------------------

#include <Debug.au3>
Local $dbg_title = "local window for debug"
_DebugSetup($dbg_title,False, 1)

Global $ary1[2][2] = [[1,2],[3,4]]
Global $ary2 = $ary1
Global $ary3 = copy1()
Global $ary4 = copy2()

$ary1[0][0] = 5
$ary2[0][1] = 6
$ary3[1][0] = 7
$ary4[1][1] = 8

pra("$ary1",$ary1)
pra("$ary2",$ary2)
pra("$ary3",$ary3)
pra("$ary4o",$ary4)
modif($ary4)
pra("$ary4m",$ary4)
Local $s =" ok "
_DebugOut("s=" & $s)
modif2($s)
_DebugOut("s=" & $s)

$s = " "
If $s Then
	_DebugOut("tru")
Else
	_DebugOut("fal")
EndIf

For $i = 0 To 5
	For $j = 0 To 5
		If $j = 2 Then
			$i = 5
			$j = 5
		EndIf
		_DebugOut($i & " " & $j)
	Next
Next
		
		

Func pra($s,ByRef $a)
   _DebugOut($s & ": "& $a[0][0] & "," & $a[0][1] & "," & $a[1][0] & "," & $a[1][1])
EndFunc

Func copy1()
   Local $a = $ary1
   Return $a
EndFunc

Func copy2()
   Return $ary1
EndFunc

Func modif(ByRef $ary)
	$ary[0][0] += 10
	$ary[0][1] += 10
EndFunc

Func modif2(ByRef $ary)
	$ary &= "test"
EndFunc
